package com.myhome.money.jetty.service.impl;

import com.myhome.money.jetty.service.HelloService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @author 许路路
 */
@Service
public class HelloServiceImpl implements HelloService {

    private static Logger logger = LoggerFactory.getLogger(HelloServiceImpl.class);

    public void sayHi() {
        logger.debug("5678debug....");
        logger.info("5678info....");
        logger.warn("5678warn....");
        logger.error("5678error...");
    }

    public void hello(int state) throws IllegalStateException {
        if (state == 1) {
            throw new IllegalStateException("状态不能为1");
        }
        logger.info("state:{}.", state);
    }
}
